/*
 * Copyright Thoughtworks, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
@use "sass:color";
@use "sass:map";
@import "../../global/common";

$border-color: #ddd;

.env-header {
  display: flex;
  min-width: 600px;
  justify-content: space-between;
}

.env-name {
  font-weight: 600;
  min-width: 250px;
  max-width: 250px;
  text-overflow: ellipsis;
  overflow: hidden;
}

.env-body {
  display: flex;
  width: 100%;

  .env-body-element:nth-child(n) {
    border-right: 1px solid $border-color;
  }

  .env-body-element:last-child {
    border-right: none;
  }
}

.env-body-element {
  padding: 0 25px 25px 25px;
  width: 100%;

  ul {
    li {
      width: 100%;
      word-break: break-all;
      padding: 2px;
    }
  }
}

.env-body-element-header {
  padding: 5px 5px 5px 0;
  border-bottom: 1px solid $border-color;

  span {
    font-weight: 600;
    margin-right: 10px;
  }
}

.env-var-heading {
  font-weight: 600;
  margin-top: 15px;
}

.create-env-err-msg-container {
  width: 88%;
}

.warning-tooltip-wrapper {
  position: static;
  display: inline-block;

  &:hover {
    .warning-tooltip-content {
      display: block;
    }
  }
}

.warning-icon {
  @include icon-before($type: $fa-var-exclamation-circle, $color: color.adjust($warning, $lightness: -30%));

  &::before {
    font-size: 20px;
    padding: 2px 12px 2px 2px;
  }
}

.warning-tooltip-content {
  display: none;
  background: $white;
  line-height: 18px;
  font-size: 12px;
  position: absolute;
  margin-left: -8px;
  margin-top: 3px;
  font-weight: 400;
  border-radius: $global-border-radius;
  padding: 10px 20px 0;
  box-shadow: 0 2px 4px $box-shadow-color;
  z-index: map.get($zindex, submenu);

  &::before {
    content: "";
    position: absolute;
    width: 10%;
    height: 0;
    margin-left: -0.5em;
    top: 0;
    left: 17px;
    box-sizing: border-box;
    border: 6px solid $black;
    border-color: $white $white transparent transparent;
    transform-origin: 0 0;
    transform: rotate(-45deg);
    box-shadow: 1px -1px 1px 0 $box-shadow-color;
  }
}

.tips {
  background: $white;
  padding: 20px;
}
